<template>
  <div>
    <button @click="comp = 'Count'">切换组件到Count</button>
    <button @click="comp = 'Movie'">切换组件到Movie</button>
    <component :is="comp"></component>
  </div>
</template>

<script>
import Count from "./components/Count";
import Movie from "./components/Movie";
export default {
  name: "APP",
  components: {
    Count,
    Movie,
  },
  data() {
    return {
      comp: "Count",
    };
  },
};
</script>

<style scoped></style>
